﻿using System;
using System.Collections.Generic;
using Colorful.Furniture.Extensions;
using Newtonsoft.Json;

namespace Colorful.Furniture.EnterpriseManagement;

/// <summary>
///  部门详情
/// </summary>
public class DepartmentDetailOutputDto
{
    /// <summary>
    ///  id
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    ///  部门id
    /// </summary>
    public long DepartId { get; set; }

    /// <summary>
    ///  部门名字
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    ///  英文名字
    /// </summary>
    public string NameEn { get; set; }

    /// <summary>
    ///  部门领导
    /// </summary>
    [JsonIgnore]
    public string Leader { get; set; }

    /// <summary>
    ///  部门领导
    /// </summary>
    [JsonProperty("departmentLeader")]
    public List<string> LeaderList => Leader.StringToGeneric<List<string>>();

    /// <summary>
    ///  父级编码
    /// </summary>
    public long ParentDepartId { get; set; }

    /// <summary>
    ///  排序
    /// </summary>
    public int Sort { get; set; } = 1;
}


/// <summary>
///  部门1
/// </summary>
public class  DepartmentOutputDto1{
    public Guid Id { get; set; }

    public long DepartId { get; set; }
}

/// <summary>
///  部门排序输出
/// </summary>
public class DepartmentSortOutputDto: DepartmentOutputDto1
{
    /// <summary>
    ///  排序数字
    /// </summary>
    public int Sort { get; set; }
}